window.addEventListener('DOMContentLoaded', function() {
    console.log('aa');
    let inputs = document.querySelectorAll('input[name=option]');
    let box = document.querySelector('.parent');
    Array.from(inputs).forEach((ele, i) => {
        ele.onchange = function() {
            let value = this.value;
            let prop = this.dataset.attr;
            box.style[prop] = value;
        }
    })
})
